import java.util.Scanner;

public class J1507 {
    public static void print_digit(int n){
        if(n < 10){
            System.out.print(n + " ");
        }else{
            print_digit(n / 10);
            System.out.print(n % 10 + " ");
        }
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        print_digit(n);
    }
}
